<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>新客登记</title>
		<!--标准mui.css-->
		<link rel="stylesheet" href="css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="pro_css/registration.css" />
		<link rel="stylesheet" type="text/css" href="css/app.css" />
		<!--<link rel="stylesheet" type="text/css" href="pro_css/parts.css" />-->
		<link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
		<link rel="stylesheet" type="text/css" href="pro_css/register.css" />
		<style>
			html,
			body,
			.mui-content {
				height: 0px;
				margin: 0px;
				background-color: #efeff4;
			}
			
			h5.mui-content-padded {
				margin-left: 3px;
				margin-top: 20px !important;
			}
			
			h5.mui-content-padded:first-child {
				margin-top: 12px !important;
			}
			
			h5 {
				width: 56px;
			}
			
			.mui-btn {
				font-size: 16px;
				padding: 8px;
				margin: 3px;
			}
			
			.ui-alert {
				/*text-align: center;*/
				/*padding: 20px 10px;*/
				/*font-size: 12px;*/
				/*position: relative;
    			top: -31px;
    			left: 94px;
   				width: 23%;*/
				text-align: left;
				line-height: 20px;
			}
			
			* {
				-webkit-touch-callout: none;
				-webkit-user-select: none;
			}
			
			.mui-bar {
				background: #ff954e;
			}
			
			.mui-title {
				color: #fff;
			}
			
			.mui-icon-back:before,
			.mui-icon-left-nav:before {
				color: #fff;
			}
			
			.mui-btn-block {
				width: 75%;
			}
			
			input[type=color],
			input[type=date],
			input[type=datetime-local],
			input[type=datetime],
			input[type=email],
			input[type=month],
			input[type=number],
			input[type=password],
			input[type=search],
			input[type=tel],
			input[type=text],
			input[type=time],
			input[type=url],
			input[type=week],
			select,
			textarea {
				width: 75%;
				margin-bottom: 0;
			}
			.select{
	border: 1px solid #ccc;
}
.button{
	border-radius: 5px;
				background: #FF954E;
				border: 1px solid #FF954E;
				color: #fff;
				font-family: "微软雅黑";
}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">瘦吧</h1>
		</header>
		<div class="mui-content">
			<div>
				<div class="font_style fl" style="line-height: 48px;">新客登记</div>
			</div>
			<div class="cl"></div>
			<div class="allwidth">
				<div style="height: 8px;"></div>
				<div class="box1">
					<div class="mui-content-padded" style="padding-top: 10px;">
					<h5 class="mui-content-padded fl">进店日期</h5>
					<button id='demo2' data-options='{"type":"date","beginYear":2014,"endYear":2018}' class="btn mui-btn mui-btn-block fl" style="height: 35px;">
					<div id='result' class="ui-alert"></div>
					<div class="picture"><img src="img/calendar.png"></div>
				</button>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">姓名</h5>
					<input type="text" class="mui-btn mui-btn-block fl" style="height: 35px; text-align: left;" />
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">性别</h5>
					
					<div>
						<select class="mui-btn mui-btn-block fl" style="text-align: left;">
						<option value="chrome">男</option>
						<option value="safari">女</option>
					</select>
					<div class="fr" style="position:absolute;top:35.5%;left: 82%;"><img src="img/jt.png" style="width: 20px;height: 10px;"></div>
					</div>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">手机号码 </h5>
					<input type="text" class="mui-btn mui-btn-block fl" style="height: 35px; text-align: left;" />
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">年龄</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px; text-align: left;">
					<div class="picture font_style1">岁</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">身高</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px; text-align: left;">
					<div class="picture font_style2">cm</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">当前体重</h5>
					<input id='demo2' class="mui-btn fl" style=" width: 55%; height: 35px; text-align: left;">
					<div class="picture font_style3">斤</div>
					<div class="fr">
						<button type="button" style="margin-top: 3px; margin-right: 10px;" class="fr button">预算</button>
					</div>
				</input>
				</div>
				<div class="cl"></div>
				</div>
				
				<div class="box1">
					<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">标准体重</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px;  text-align: left;">
					<div class="picture font_style4">斤</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">目标体重</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px;  text-align: left;">
					<div class="picture font_style5">斤</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">应减斤数</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px;  text-align: left;">
					<div class="picture font_style6">斤</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">总目标</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px;  text-align: left;">
					<div class="picture font_style7">月</div>
				</input>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">购买疗程</h5>
					
					<div>
						<select class="mui-btn mui-btn-block fl" style="text-align: left;">
						<option value="chrome">标准疗程</option>
						<option value="safari">标准疗程</option>
					</select>
					<div class="fr" style="position:absolute;top:107.5%;left: 82%;"><img src="img/jt.png" style="width: 20px;height: 10px;"></div>
					</div>
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">疗程数</h5>
					<input type="text" class="mui-btn mui-btn-block fl" style="height: 35px; text-align: left;" />
				</div>
				<div class="cl"></div>
				<div class="mui-content-padded">
					<h5 class="mui-content-padded fl">金额</h5>
					<input id='demo2' class="mui-btn mui-btn-block fl" style="height: 35px;  text-align: left;">
					<div class="picture font_style8">元</div>
				</input>
				</div>
				<div class="cl"></div>
				<button type="button" style="margin: 20px 0;width: 100%; " class="fr button">保存</button>
				
				</div>

				<div class="cl"></div>
				
			</div>
		</div>
		<script src="js/mui.min.js"></script>
		<!--<script src="../js/mui.picker.js"></script>
		<script src="../js/mui.dtpicker.js"></script>-->
		<script src="js/mui.picker.min.js"></script>
		<script>
			(function($) {
				$.init();
				var result = $('#result')[0];
				var btns = $('.btn');
				btns.each(function(i, btn) {
					btn.addEventListener('tap', function() {
						var _self = this;
						if(_self.picker) {
							_self.picker.show(function(rs) {
								result.innerText = ' ' + rs.text;
								_self.picker.dispose();
								_self.picker = null;
							});
						} else {
							var optionsJson = this.getAttribute('data-options') || '{}';
							var options = JSON.parse(optionsJson);
							var id = this.getAttribute('id');
							/*
							 * 首次显示时实例化组件
							 * 示例为了简洁，将 options 放在了按钮的 dom 上
							 * 也可以直接通过代码声明 optinos 用于实例化 DtPicker
							 */
							_self.picker = new $.DtPicker(options);
							_self.picker.show(function(rs) {
								/*
								 * rs.value 拼合后的 value
								 * rs.text 拼合后的 text
								 * rs.y 年，可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
								 * rs.m 月，用法同年
								 * rs.d 日，用法同年
								 * rs.h 时，用法同年
								 * rs.i 分（minutes 的第二个字母），用法同年
								 */
								result.innerText = ' ' + rs.text;
								/* 
								 * 返回 false 可以阻止选择框的关闭
								 * return false;
								 */
								/*
								 * 释放组件资源，释放后将将不能再操作组件
								 * 通常情况下，不需要示放组件，new DtPicker(options) 后，可以一直使用。
								 * 当前示例，因为内容较多，如不进行资原释放，在某些设备上会较慢。
								 * 所以每次用完便立即调用 dispose 进行释放，下次用时再创建新实例。
								 */
								_self.picker.dispose();
								_self.picker = null;
							});
						}

					}, false);
				});
			})(mui);
		</script>
	</body>

</html>